<template>
  <bc-container showFooter>
    <data-panel ref="dataPanelRef" :columns="columns" :dataSource="tableData"> </data-panel>
    <template #containerFooter>
      <el-button type="primary" @click="handleBack">返回</el-button>
    </template>
  </bc-container>
</template>

<script setup>
import DataPanel from '@/components/DataPanel.vue'
import { columns } from './config'
import { nextTick, shallowRef } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()

/**
 * 列表
 */
const dataPanelRef = shallowRef()
const tableData = async (params) => {
  params['ownerId'] = route.params.oId
  const res = await $request.post('/api-parking/parking/browseShareRecord/queryByOwner', { params })
  return res
}
const loadData = () => {
  nextTick(() => {
    dataPanelRef.value.load()
  })
}

const handleBack = () => {
  router.back()
}
</script>

<style lang="scss" scoped></style>
